﻿using System;
using System.Collections.Generic;

namespace JTLeigh.Commerce.Spencer.Features.ProductImages.Common.Entities
{

	/// <summary>
	/// Represents a single view of a product.
	/// </summary>
	public class ProductImage
	{

		#region Constructors

		/// <summary>
		/// Initializes a new instance of the <see cref="ProductImage"/> class.
		/// </summary>
		public ProductImage()
		{
			Localizations = new Dictionary<int, ProductImageLocalization>();
			Variants = new Dictionary<Guid, ProductImageVariant>();
		}

		#endregion // Constructors

		#region Properties

		/// <summary>
		/// Gets or sets the image identifier.
		/// </summary>
		/// <value>An image identifier <see cref="Guid"/>.</value>
		public Guid ImageId { get; set; }

		/// <summary>
		/// Gets or sets the view identifier.
		/// </summary>
		/// <value>A view identifier <see cref="Guid"/>.</value>
		public Guid ViewId { get; set; }

		/// <summary>
		/// Gets or sets the default alternative text that should be displayed in place of the 
		/// image.
		/// </summary>
		public string DefaultAlternativeText { get; set; }

		/// <summary>
		/// Gets or sets the default usage permission text that should be attached to the image.
		/// </summary>
		public string DefaultUsagePermissionText { get; set; }

		/// <summary>
		/// Gets the dictionary of the image's localizations.
		/// </summary>
		/// <value>A <see cref="Dictionary{TKey,TValue}"/> of <see cref="ProductImageLocalization"/>
		/// keyed by culture identifier.</value>
		public Dictionary<int, ProductImageLocalization> Localizations { get; private set; }

		/// <summary>
		/// Gets the dictionary of the image's variants.
		/// </summary>
		/// <value>A <see cref="Dictionary{TKey,TValue}"/> of <see cref="ProductImageVariant"/>
		/// keyed by variant identifier <see cref="Guid"/>.</value>
		public Dictionary<Guid, ProductImageVariant> Variants { get; private set; }

		#endregion // Properties

	}

}
